<?
layout("/inc/layout.html",{title:sysTitle}){
?>
<style>
	#tableactiondTab .btn-default.on{
		background: #086176;
    		color: #fff;
    		border-color: #064a59;
	}
	#tableactionTabContent{
		position: relative;
		/* height: 40px; */
		padding-top: 20px;
	}
</style>
<div id="page-wrapper">
	<!--BEGIN TITLE & BREADCRUMB PAGE-->
	<div id="title-breadcrumb-option-demo" class="page-title-breadcrumb">
		<div class="page-header pull-left">
			<div class="page-title">知识加工</div>
		</div>
		<ol class="breadcrumb page-breadcrumb pull-left">
			<li><i class="fa fa-home"></i>&nbsp;<a href="main.html">首页</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
			<li class="active">知识加工</li>
		</ol>

		<div class="clearfix"></div>
	</div>
	<!--END TITLE & BREADCRUMB PAGE-->
	<!--BEGIN CONTENT-->
	<div class="page-content">
		
		<div class="row">
		      <div class="col-lg-12">
		       <div class="note note-danger">
		           <h3 class="box-heading">知识库-知识加工</h3>
		           <p>知识库数据加工主要包括基础属性加工和关联属性加工，支持知识可视化展示。</p>
		       </div>
		   </div>
		</div>
		<div class="row" style="margin-bottom: 20px;display: none;" >
	       <div class="col-lg-12">
          	 <!-- 分库分表 start  -->
	          		<div class="col-lg-12">
						<div id="tableactiondTab" >
							资源库标识：
							<input type="button" data-value="0" data-name="#table-dal_hymax_test1-tab" class="btn btn-default dropdown-toggle on" value="全部">
							<?for(dictItem in dictItemList){?>
								<input type="button" data-value="${dictItem.value}" data-name="#table-dal_hymax_test1-tab" class="btn btn-default dropdown-toggle" value="${dictItem.nameZh}">
							<?}?>
						</div>
                      </div>
               <!-- 分库分表 end  -->
		   </div>
	   </div> 
		<div class="row">
			<div id="tab-general" class="tab-general  col-lg-12">
				<div id="sum_box" class="sum_box row mbl " style=" height:540px;overflow-y :auto">
				</div>

				<!-- 其他区域展示如下 -->

			</div>
		</div>
	</div>
	<!--END CONTENT-->
</div>
<!-- 左侧导航树 -->
<SCRIPT type="text/javascript">
$(function(){
	initText('0');
	$('#tableactiondTab').on('click','.btn-default',function(){
		var index=$(this).index();
		$(this).addClass('on').siblings().removeClass('on');
		initText(this.getAttribute("data-value"));
	});
});

	function initText(daValue){
		//$("#sum_box").html('<img src="static/images/await.gif" alt="" />'); 
		$.ajax({
			type : "post",
			url : "knowledge-edit-data-class-ajax-right.html",
			dataType : "json",
			data:{
				"type": "1",
				"daValue": daValue,
			},
			beforeSend : function(XMLHttpRequest) {},
			success:function(data){
			/*  alert(JSON.stringify(data));   */
			    var str = "";   
     	    	$("#sum_box").html("");
     	    	for(var i=0;i<data.length;i++){
     	    		var nameEn= data[i].nameEn;
     	    		var nameZh= data[i].nameZh;
     	    		var number= data[i].number;
     	    		var classesId= data[i].classesId;
     	    		var count = number;
     	    		var colour="";
     	    		if(count<10){
     	    			colour ="progress-bar-success";
     	    		}else if(count>=10 && count<20){
     	    			colour ="progress-bar-info";
     	    		}else if(count>=20 && count<30){
     	    			colour ="progress-bar-warning";
     	    		}else if(count>=30){
     	    			colour ="progress-bar-danger";
     	    		}
     	    		if(data[i].kind=='0'){
					 str+="<div class=\"col-sm-12 col-md-4\">"
	                	+"<a href='show-edit-data-list.html?classesEn="+nameEn+"&classesId="+classesId+"'>"
		                 +"<div class=\"panel yellow db mbm\">"
		                   +"<div class=\"panel-body\">"     
		                       +" <p class=\"icon\"><i class=\"icon fa iconfont icon-zhishiku\"></i>"    
		                          +"</p>"  
		                          +"<h4 class=\"value\"><span>"+number+"</span></h4>"  
		                           +"<p class=\"description\">"+nameZh+"</p>" 
		                             +"<div class=\"progress progress-sm mbn\">"
		                               +"<div role=\"progressbar\" aria-valuenow="+count+" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width:"+count+"%;\" class='progress-bar "+colour+"'><span class=\"sr-only\">"+count+"% Complete (success)</span>"   
		                              +"</div>" 
		                            +"</div>" 
		                        +"</div>"
		                    +"</div>"
	                   +"</a>" 
	               +"</div>" ;
		           }   
     	    	}
				$("#sum_box").html(str); 
			 	
			}
		});
	}

</SCRIPT>

<?} ?>
